package com.zim.access.webapi.connection;

import com.zim.access.domain.URI;
import com.zim.access.domain.connection.Connection;
import com.zim.access.domain.node.Node;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(tags = "connection", description = "连接接口")
@RestController
@RequestMapping(value = "/connection")
public class ConnectionController {

    @ApiOperation("查询机器是否健康")
    @GetMapping("/healthcheck")
    @ResponseBody
    public boolean isHealthcheck(@RequestParam URI uri) {
        return false;
    }

    @ApiOperation("查询当前连接所在节点")
    @GetMapping("/node")
    @ResponseBody
    public Node queryNode(@RequestParam URI uri) {
        return null;
    }

    @ApiOperation("查询当前连接元数据信息")
    @GetMapping("/metadata")
    @ResponseBody
    public Connection queryMetadata(@RequestParam URI uri) {
        return null;
    }
}
